3.4.13 \(\int \cos ^5(c+d x) (a+a \sec (c+d x)) (B \sec (c+d x)+C \sec ^2(c+d x)) \, dx\) [313]

Optimal. Leaf size=97 \[ \frac {1}{8} a (3 B+4 C) x+\frac {a (B+C) \sin (c+d x)}{d}+\frac {a (3 B+4 C) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a B \cos ^3(c+d x) \sin (c+d x)}{4 d}-\frac {a (B+C) \sin ^3(c+d x)}{3 d} \]

[Out]

1/8*a*(3*B+4*C)*x+a*(B+C)*sin(d*x+c)/d+1/8*a*(3*B+4*C)*cos(d*x+c)*sin(d*x+c)/d+1/4*a*B*cos(d*x+c)^3*sin(d*x+c)
/d-1/3*a*(B+C)*sin(d*x+c)^3/d

________________________________________________________________________________________

Rubi [A]
time = 0.12, antiderivative size = 97, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {4157, 4081, 3872, 2713, 2715, 8} \begin {gather*} -\frac {a (B+C) \sin ^3(c+d x)}{3 d}+\frac {a (B+C) \sin (c+d x)}{d}+\frac {a (3 B+4 C) \sin (c+d x) \cos (c+d x)}{8 d}+\frac {a B \sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac {1}{8} a x (3 B+4 C) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^5*(a + a*Sec[c + d*x])*(B*Sec[c + d*x] + C*Sec[c + d*x]^2),x]

[Out]

(a*(3*B + 4*C)*x)/8 + (a*(B + C)*Sin[c + d*x])/d + (a*(3*B + 4*C)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + (a*B*Cos[
c + d*x]^3*Sin[c + d*x])/(4*d) - (a*(B + C)*Sin[c + d*x]^3)/(3*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2713

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rule 2715

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Sin[c + d*x])^(n - 1)/(d*n))
, x] + Dist[b^2*((n - 1)/n), Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integ
erQ[2*n]

Rule 3872

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[a, Int[(d*
Csc[e + f*x])^n, x], x] + Dist[b/d, Int[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]

Rule 4081

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))*(csc[(e_.) + (f_.)*(x_)]*(B_.)
 + (A_)), x_Symbol] :> Simp[A*a*Cot[e + f*x]*((d*Csc[e + f*x])^n/(f*n)), x] + Dist[1/(d*n), Int[(d*Csc[e + f*x
])^(n + 1)*Simp[n*(B*a + A*b) + (B*b*n + A*a*(n + 1))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, B},
 x] && NeQ[A*b - a*B, 0] && LeQ[n, -1]

Rule 4157

Int[((a_.) + csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(
x_)]^2*(C_.))*((c_.) + csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.), x_Symbol] :> Dist[1/b^2, Int[(a + b*Csc[e + f*x])
^(m + 1)*(c + d*Csc[e + f*x])^n*(b*B - a*C + b*C*Csc[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, m,
 n}, x] && EqQ[A*b^2 - a*b*B + a^2*C, 0]

Rubi steps

\begin {align*} \int \cos ^5(c+d x) (a+a \sec (c+d x)) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\int \cos ^4(c+d x) (a+a \sec (c+d x)) (B+C \sec (c+d x)) \, dx\\ &=\frac {a B \cos ^3(c+d x) \sin (c+d x)}{4 d}-\frac {1}{4} \int \cos ^3(c+d x) (-4 a (B+C)-a (3 B+4 C) \sec (c+d x)) \, dx\\ &=\frac {a B \cos ^3(c+d x) \sin (c+d x)}{4 d}+(a (B+C)) \int \cos ^3(c+d x) \, dx+\frac {1}{4} (a (3 B+4 C)) \int \cos ^2(c+d x) \, dx\\ &=\frac {a (3 B+4 C) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a B \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac {1}{8} (a (3 B+4 C)) \int 1 \, dx-\frac {(a (B+C)) \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{d}\\ &=\frac {1}{8} a (3 B+4 C) x+\frac {a (B+C) \sin (c+d x)}{d}+\frac {a (3 B+4 C) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a B \cos ^3(c+d x) \sin (c+d x)}{4 d}-\frac {a (B+C) \sin ^3(c+d x)}{3 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.26, size = 75, normalized size = 0.77 \begin {gather*} \frac {a \left (36 B c+48 c C+36 B d x+48 C d x+96 (B+C) \sin (c+d x)-32 (B+C) \sin ^3(c+d x)+24 (B+C) \sin (2 (c+d x))+3 B \sin (4 (c+d x))\right )}{96 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^5*(a + a*Sec[c + d*x])*(B*Sec[c + d*x] + C*Sec[c + d*x]^2),x]

[Out]

(a*(36*B*c + 48*c*C + 36*B*d*x + 48*C*d*x + 96*(B + C)*Sin[c + d*x] - 32*(B + C)*Sin[c + d*x]^3 + 24*(B + C)*S
in[2*(c + d*x)] + 3*B*Sin[4*(c + d*x)]))/(96*d)

________________________________________________________________________________________

Maple [A]
time = 1.31, size = 107, normalized size = 1.10

method result size
derivativedivides \(\frac {B a \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {B a \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+\frac {a C \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+a C \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) \(107\)
default \(\frac {B a \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {B a \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+\frac {a C \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+a C \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) \(107\)
risch \(\frac {3 a B x}{8}+\frac {a x C}{2}+\frac {3 \sin \left (d x +c \right ) B a}{4 d}+\frac {3 \sin \left (d x +c \right ) a C}{4 d}+\frac {B a \sin \left (4 d x +4 c \right )}{32 d}+\frac {\sin \left (3 d x +3 c \right ) B a}{12 d}+\frac {\sin \left (3 d x +3 c \right ) a C}{12 d}+\frac {B a \sin \left (2 d x +2 c \right )}{4 d}+\frac {\sin \left (2 d x +2 c \right ) a C}{4 d}\) \(118\)
norman \(\frac {\frac {a \left (3 B +4 C \right ) x}{8}-\frac {2 a \left (B -2 C \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}-\frac {8 a \left (B +C \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}+\frac {a \left (3 B +4 C \right ) \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {3 a \left (3 B +4 C \right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}+\frac {a \left (3 B +4 C \right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}-\frac {5 a \left (3 B +4 C \right ) x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}-\frac {5 a \left (3 B +4 C \right ) x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}+\frac {a \left (3 B +4 C \right ) x \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}+\frac {3 a \left (3 B +4 C \right ) x \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}+\frac {a \left (3 B +4 C \right ) x \left (\tan ^{14}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}+\frac {2 a \left (5 B +2 C \right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}-\frac {a \left (7 B +20 C \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}-\frac {a \left (9 B -4 C \right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {a \left (13 B +12 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}\) \(358\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^5*(a+a*sec(d*x+c))*(B*sec(d*x+c)+C*sec(d*x+c)^2),x,method=_RETURNVERBOSE)

[Out]

1/d*(B*a*(1/4*(cos(d*x+c)^3+3/2*cos(d*x+c))*sin(d*x+c)+3/8*d*x+3/8*c)+1/3*B*a*(2+cos(d*x+c)^2)*sin(d*x+c)+1/3*
a*C*(2+cos(d*x+c)^2)*sin(d*x+c)+a*C*(1/2*cos(d*x+c)*sin(d*x+c)+1/2*d*x+1/2*c))

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 101, normalized size = 1.04 \begin {gather*} -\frac {32 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B a - 3 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} B a + 32 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} C a - 24 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C a}{96 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^5*(a+a*sec(d*x+c))*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="maxima")

[Out]

-1/96*(32*(sin(d*x + c)^3 - 3*sin(d*x + c))*B*a - 3*(12*d*x + 12*c + sin(4*d*x + 4*c) + 8*sin(2*d*x + 2*c))*B*
a + 32*(sin(d*x + c)^3 - 3*sin(d*x + c))*C*a - 24*(2*d*x + 2*c + sin(2*d*x + 2*c))*C*a)/d

________________________________________________________________________________________

Fricas [A]
time = 3.11, size = 74, normalized size = 0.76 \begin {gather*} \frac {3 \, {\left (3 \, B + 4 \, C\right )} a d x + {\left (6 \, B a \cos \left (d x + c\right )^{3} + 8 \, {\left (B + C\right )} a \cos \left (d x + c\right )^{2} + 3 \, {\left (3 \, B + 4 \, C\right )} a \cos \left (d x + c\right ) + 16 \, {\left (B + C\right )} a\right )} \sin \left (d x + c\right )}{24 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^5*(a+a*sec(d*x+c))*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="fricas")

[Out]

1/24*(3*(3*B + 4*C)*a*d*x + (6*B*a*cos(d*x + c)^3 + 8*(B + C)*a*cos(d*x + c)^2 + 3*(3*B + 4*C)*a*cos(d*x + c)
+ 16*(B + C)*a)*sin(d*x + c))/d

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**5*(a+a*sec(d*x+c))*(B*sec(d*x+c)+C*sec(d*x+c)**2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]
time = 0.49, size = 156, normalized size = 1.61 \begin {gather*} \frac {3 \, {\left (3 \, B a + 4 \, C a\right )} {\left (d x + c\right )} + \frac {2 \, {\left (9 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 12 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 49 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 28 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 31 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 52 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 39 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 36 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{4}}}{24 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^5*(a+a*sec(d*x+c))*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="giac")

[Out]

1/24*(3*(3*B*a + 4*C*a)*(d*x + c) + 2*(9*B*a*tan(1/2*d*x + 1/2*c)^7 + 12*C*a*tan(1/2*d*x + 1/2*c)^7 + 49*B*a*t
an(1/2*d*x + 1/2*c)^5 + 28*C*a*tan(1/2*d*x + 1/2*c)^5 + 31*B*a*tan(1/2*d*x + 1/2*c)^3 + 52*C*a*tan(1/2*d*x + 1
/2*c)^3 + 39*B*a*tan(1/2*d*x + 1/2*c) + 36*C*a*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 + 1)^4)/d

________________________________________________________________________________________

Mupad [B]
time = 5.42, size = 184, normalized size = 1.90 \begin {gather*} \frac {\left (\frac {3\,B\,a}{4}+C\,a\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (\frac {49\,B\,a}{12}+\frac {7\,C\,a}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (\frac {31\,B\,a}{12}+\frac {13\,C\,a}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (\frac {13\,B\,a}{4}+3\,C\,a\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {a\,\mathrm {atan}\left (\frac {a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (3\,B+4\,C\right )}{4\,\left (\frac {3\,B\,a}{4}+C\,a\right )}\right )\,\left (3\,B+4\,C\right )}{4\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^5*(B/cos(c + d*x) + C/cos(c + d*x)^2)*(a + a/cos(c + d*x)),x)

[Out]

(tan(c/2 + (d*x)/2)*((13*B*a)/4 + 3*C*a) + tan(c/2 + (d*x)/2)^7*((3*B*a)/4 + C*a) + tan(c/2 + (d*x)/2)^3*((31*
B*a)/12 + (13*C*a)/3) + tan(c/2 + (d*x)/2)^5*((49*B*a)/12 + (7*C*a)/3))/(d*(4*tan(c/2 + (d*x)/2)^2 + 6*tan(c/2
 + (d*x)/2)^4 + 4*tan(c/2 + (d*x)/2)^6 + tan(c/2 + (d*x)/2)^8 + 1)) + (a*atan((a*tan(c/2 + (d*x)/2)*(3*B + 4*C
))/(4*((3*B*a)/4 + C*a)))*(3*B + 4*C))/(4*d)

________________________________________________________________________________________